package com.fanjun.learning.multithread.Thread_Per_Message_Pattern;

/**
 * <p>实际执行的类</p>
 */
public class Helper {
    public void handle(int count, char c) {
        System.out.println("handle(" + count + "," + c + " begin)");
        for (int i = 0; i < count; i++){
            slowly();
            System.out.println(c);
        }
        System.out.println("handle(" + count + "," + c + " end)");
    }

    private void slowly() {
        try {
            Thread.sleep(50);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
